#include "Graph.h"
#include "Graph_2.h"
#include "Simple_window.h"

const int WIN_W = 800;
const int WIN_H = 800;


int main()
{
	try{
		Simple_window win(Point(100, 100), 800, 800, "Ex_2");
		Point center(WIN_W/2,WIN_H/2);
		
		Vector_ref <Box> vb;
		for (int x = 100, i=0; x< 130; x+=10, ++i)
		{
			vb.push_back(new Box(Point(x,x),200,100, 10));
			vb[i].set_fill_color(Color::white);
			vb[i].set_color(Color::black);
			win.attach(vb[i]);
		}
		BoxWithText headers(Point(130,130),200,100,10, "FLTK headers");
		headers.set_fill_color(Color::white);
		headers.set_color(Color::black);
		headers.set_font_size(20);
		win.attach(headers);
		
		
		BoxWithText windowh(Point(130,330),200,100,10, "interface window.h");
		windowh.set_fill_color(Color::white);
		windowh.set_color(Color::black);
		windowh.set_font_size(20);
		win.attach(windowh);
		Arrow ar1(Point(230,330),Point(230,230), 10); 
		win.attach(ar1);
		
		
		win.wait_for_button();
		windowh.set_fill_color(Color::red);
		win.wait_for_button();
	}
	catch (exception& e){
		return 1;
	}
	catch(...){
		return 2;
	}

	
}